package entity;

public class Student {
    private String name;
    private int sid;
    private String sex;
    private int age;
    private double gpa;
    private int grade;
    private boolean inschool;
    private String phonenum;
    public void displayinfo(){
        System.out.println("姓名："+name+"\n"+"学号："+sid);
    }
    //无参构造方法
    public Student(){
        System.out.println("构造方法被调用");
    }
    //有参构造方法
    public Student(String name,int sid,String sex,int age,double gpa,int grade,boolean inschool,String phonenum){
        this.name=name;
        this.sid=sid;
        this.sex=sex;
        this.age=age;
        this.gpa=gpa;
        this.grade=grade;
        this.inschool=inschool;
        this.phonenum=phonenum;
    }
}
